import request from '@/utils/request'

// 查询销售单列表
export function listSellOrder(query) {
  return request({
    url: '/sell/sellOrder/list',
    method: 'get',
    params: query
  })
}

// 查询销售单详细
export function getSellOrder(id) {
  return request({
    url: '/sell/sellOrder/' + id,
    method: 'get'
  })
}

export function payOrder(data) {
  return request({
    url: '/sell/sellOrder/pay',
    method: 'put',
    data: data
  })
}


// 新增销售单
export function addSellOrder(data) {
  return request({
    url: '/sell/sellOrder',
    method: 'post',
    data: data
  })
}

// 修改销售单
export function updateSellOrder(data) {
  return request({
    url: '/sell/sellOrder',
    method: 'put',
    data: data
  })
}

// 删除销售单
export function delSellOrder(id) {
  return request({
    url: '/sell/sellOrder/' + id,
    method: 'delete'
  })
}
